"use strict";

exports.__esModule = true;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Queue = exports.Queue = function () {
    function Queue() {
        _classCallCheck(this, Queue);

        this.data = [];
    }

    Queue.prototype.add = function add(record) {
        this.data.unshift(record);
    };

    Queue.prototype.remove = function remove() {
        this.data.pop();
    };

    Queue.prototype.first = function first() {
        return this.data[0];
    };

    Queue.prototype.last = function last() {
        return this.data[this.data.length - 1];
    };

    Queue.prototype.size = function size() {
        return this.data.length;
    };

    return Queue;
}();